<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});


//小程序登录方法路由
Route::prefix('smallApp')->group(function () {
    Route::any('login','SmallApp@login');
});








//text控制器的index方法
//Route::any('index','Text@index');

//小程序页面
//获取商品分类信息
//Route::get('get-goods-type','Small@getGoodsType');
//
////获取商品信息
//Route::prefix('small')->group(function () {
//    Route::get('get-goods','Small@getGoods');
//
//    Route::any('login','Small@login');
//});






//get进行对添加"商品分类"表单的页面
Route::get('add-goods-type', function () {
    return view('goodsType.addGoodsType');
});

//控制器商品分类处理数据方法
Route::post('add-goods-type-do','Text@addGoodsTypeDo');

//控制器商品分类展示方法
Route::get('goods-type-list','Text@goodsTypeList');


//控制器商品分类删除方法
Route::get('del-goods-type-one','Text@delGoodsTypeOne');





//商品添加方法
Route::get('add-goods','GoodsController@addGoods');

//商品添加处理
Route::post('add-goods-do','GoodsController@addGoodsDo');

//商品展示、
Route::post('show-goods','GoodsController@showGoods');






